﻿<Window 
    x:Class="SimpleDbBrowser.View.ViewContainers.DialogViewContainer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="{Binding Path=ViewModel.DisplayName}"
    WindowStartupLocation="CenterOwner"
    ShowInTaskbar="False"
    SizeToContent="WidthAndHeight"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    ResizeMode="NoResize"
    >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Border x:Name="ViewHost" Margin="3" />

        <Grid Grid.IsSharedSizeScope="True" Grid.Row="1" HorizontalAlignment="Right" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition SharedSizeGroup="CommandButton" />
                <ColumnDefinition SharedSizeGroup="CommandButton" />
                <ColumnDefinition SharedSizeGroup="CommandButton" />
            </Grid.ColumnDefinitions>
            <Button 
                Grid.Column="0"
                Content="OK" 
                IsDefault="True" 
                Style="{StaticResource DefaultButtonStyle}" 
                Command="{Binding Commit}"
                />
            <Button 
                Grid.Column="1"
                Content="Apply" 
                Style="{StaticResource DefaultButtonStyle}" 
                Command="{Binding Apply}"
                />
            <Button 
                Grid.Column="2"
                Content="Cancel" 
                IsCancel="True" 
                Style="{StaticResource DefaultButtonStyle}" 
                />
        </Grid>
    </Grid>
</Window>
